<?php /** @noinspection PhpPropertyCanBeReadonlyInspection */
/** @noinspection PhpPropertyCanBeReadonlyInspection */
/** @noinspection PhpPropertyCanBeReadonlyInspection */
declare(strict_types=1);

namespace Dreamcat\ApiDoc\Annotations;

use Attribute;
use JetBrains\PhpStorm\Immutable;

/**
 * 接口控制器入口注解
 * @author vijay
 */
#[Attribute(Attribute::TARGET_FUNCTION | Attribute::TARGET_METHOD)]
#[Immutable]
class ApiOperation
{
    /**
     * @param string $title 接口名称
     * @param string $tag 接口分类
     * @param string $desc 接口描述
     */
    public function __construct(private string $title, private string $tag = "", private string $desc = "")
    {
    }

    /**
     * @return string 接口名称
     */
    public function getTitle(): string
    {
        return $this->title;
    }

    /**
     * @return string 接口分类
     */
    public function getTag(): string
    {
        return $this->tag;
    }

    /**
     * @return string 接口描述
     */
    public function getDesc(): string
    {
        return $this->desc;
    }
}

# end of file
